package com.wyl.service.role

import com.wyl.dao.RoleMapper
import com.wyl.pojo.Role
import com.wyl.utils.getSqlSession

class RoleServiceImpl : RoleService {
    /**
     * 获取角色列表
     */
    override fun getRoleList(): List<Role> {
        var roleList: List<Role> = emptyList()
        getSqlSession().use {
            val roleMapper = it.getMapper(RoleMapper::class.java)
            roleList = roleMapper.getRoleList()
        }
        return roleList
    }
}